Table of Contents Previous Section

A Note to Objective-C Developers

WebScript uses a subset of Objective-C syntax, but its role within an application is significantly different. The following table summarizes some of the differences.

Objective-C  				WebScript
_____________________________________________________________________________

Is compiled  				Is interpreted

Supports primitive C data types    	Only supports the id data type

Requires method prototyping  		Doesn't require method prototyping
 					(that is, you don't declare methods 
					before you use them)

Usually includes a .h and a .m file  	Usually has corresponding declarations
 					and HTML template files (unless it is
					an application script)

Supports all C language features  	Has limited support for C language 
					features; for example, doesn't support 
					structures, pointers, enumerators, or 
					unions
					
Methods not declared to return void   	Methods aren't required to include a
must include a return statement  	return statement
 
Has pre-processor support  		Has no pre-processor support---that is,
 					doesn't support the #import or #include
					statements  
_____________________________________________________________________________

Perhaps the most significant difference between Objective-C and WebScript is that in WebScript, the only valid data type is id. Some of the less obvious implications of this are: